﻿using Loki.Data;
using Loki.Data.SqlServer;
using Loki.IoC;
using Loki.IoC.Registration;

namespace Luna.Data.SqlServer
{
    public class DatabaseInstaller : LokiContextInstaller
    {
        private static DatabaseInstaller sqlServer = new DatabaseInstaller();

        public static DatabaseInstaller SqlServer
        {
            get
            {
                return sqlServer;
            }
        }

        public override void Install(IObjectContext P_Context)
        {
            P_Context.Register(Element.For<IDatabaseManager>().ImplementedBy<LocalSqlDatabaseManager>());
            P_Context.Register(Element.For<IDatabaseAdapter>().ImplementedBy<SqlDatabaseAdapter>());
        }
    }
}